# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=khangman
pkgver=20.04.3
pkgrel=0
arch="all !armhf" # armhf blocked by qt5-qtdeclarative
url="http://edu.kde.org/khangman"
pkgdesc="Hangman game"
license="GPL-2.0-or-later"
makedepends="extra-cmake-modules qt5-qtbase-dev qt5-qtdeclarative-dev qt5-qtsvg-dev ki18n-dev kcrash-dev kcompletion-dev kconfig-dev kcoreaddons-dev kconfigwidgets-dev kdeclarative-dev kdoctools-dev knewstuff-dev knotifications-dev kxmlgui-dev kio-dev libkeduvocdocument-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/khangman-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"
options="!check" # No tests

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="d70def96ffbfed0dfca4e3ac21613639f0344520d8364793d22fe8e90cea376ac7024959007660ffa9e9849fa66158752db83333acd15103e09467a5f5cf5037  khangman-20.04.3.tar.xz"
